import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '..//views/Home.vue'
import Kind from '..//views/Kind.vue'
import Order from '..//views/Order.vue'
import My from '..//views/My.vue'
import TyHome from '../views/swcond/TyHome.vue'
import Wgty from '../views/swcond/Wgty.vue'
import Zgty from '../views/swcond/Zgty.vue'
import One from '..//views/third/One.vue'
import Two from '..//views/third/Two.vue'
import Three from '..//views/third/Three.vue'

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  {
    path: '/kind',
    name: 'kind',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    // component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    component:Kind
  },
  {
    path: '/order',
    component: Order,
    
    children:[
      {
        path:'tyhome',
        component:TyHome
      },
      {
        path:'wgty',
        component:Wgty
      },
      {
        path:'zgty',
        component:Zgty,
        children:[
         {
          path: 'one',
          component: One,
         },
         {
          path: 'two',
          component: Two,
         },
         {
          path: 'three',
          component: Three,
         }
        ]
      },

    ]
    
  },
  {
    path: '/my',
    component: My
  },
]

const router = new VueRouter({
  routes
})

export default router
